package com.example.yc23.demo.controller.fore;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.yc23.demo.pojo.Carousel;
import com.example.yc23.demo.service.CarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/fore/carousel")
public class ForeCarouselController {
    @Autowired
    private CarouselService carouselService;

    @RequestMapping("/list")
    public List<Carousel> list(){
        QueryWrapper wrapper=new QueryWrapper();
        wrapper.orderByAsc("orders");
        return carouselService.list(wrapper);
    }


}
